package com.ufun.financegateway.dto;

import com.ufun.financegateway.enums.PayType;
import com.ufun.financegateway.validation.annotation.EnumValid;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author BlendLiu
 * @date 2021/4/21 11:10
 */
@Data
public class NetPayRequestDataDto {

    @NotBlank(message = "请求时间不能为空")
    @ApiModelProperty(value = "请求时间")
    private String requestTime;

    @NotBlank(message = "机器号不能为空")
    @ApiModelProperty(value = "机器号")
    private String machineNo;

    @NotBlank(message = "用户卡号不能为空")
    @ApiModelProperty(value = "用户卡号")
    private String accountNo;

    @NotBlank(message = "用户表示不能为空")
    @ApiModelProperty(value = "用户标识")
    private String purchaserCode;

    @NotBlank(message = "外部订单好不能为空")
    @ApiModelProperty(value = "外部订单号")
    private String outerOrderNo;

    @NotNull(message = "订单金额不能为空")
    @ApiModelProperty(value = "订单金额")
    private Long amount;

    @EnumValid(enumClass = PayType.class, message = "错误的支付方式")
    @NotBlank(message = "支付方式不能为空")
    @ApiModelProperty(value = "支付方式：`TOUCH`刷卡，`FACE`刷脸")
    private String payType;

    @NotBlank(message = "结果异步通知URL不能为空")
    @ApiModelProperty(value = "结果异步通知URL")
    private String noticeUrl;

}
